package com.lianzhihui.romeex.widget.dialog;

import android.app.Activity;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;


import com.lianzhihui.romeex.R;
import com.lianzhihui.romeex.inter.CustomCallback;
import com.lianzhihui.romeex.ui.base.BaseDialog;

import butterknife.BindView;
import butterknife.OnClick;

/**
  * @ProjectName:    NBN
  * @ClassName:      CreateNidDialog
  * @Description:    创建NID
  * @Author:         echo
  * @CreateDate:     2019/11/7 14:42
  * @UpdateUser:     更新者
  * @UpdateDate:     2019/11/7 14:42
  * @UpdateRemark:   更新说明
  * @Version:        1.0
 */
public class CommonConfirmDialog extends BaseDialog {
    @BindView(R.id.tv_title)
    TextView tv_title;
    private String title;
    private CustomCallback callback;
    public CommonConfirmDialog(@NonNull Activity activity, String title, CustomCallback callback) {
        super(activity);
        this.callback = callback;
        this.title = title;
    }

    @Override
    protected int provideViewId() {
        return R.layout.dialog_common_confirm;
    }
    @Override
    protected void initView() {
        tv_title.setText(title);
    }

    @OnClick({R.id.bt_yes,R.id.bt_no})
    public void onClick(View view){
        switch (view.getId()){
            case R.id.bt_no:
                dismiss();
                break;
            case R.id.bt_yes:
                callback.onCompare("");
                dismiss();
                break;
        }
    }
}
